import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:moose_app/ui/values/values.dart';

class ATHUserAlready extends StatelessWidget {
  final bool login;
  final Function press;

  const ATHUserAlready({
    Key key,
    this.login = true,
    this.press,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(top: 10.h),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(
            login ? "没有账号？" : "有账号？",
            style: TextStyle(
              color: kColorPrimary,
            ),
          ),
          GestureDetector(
            onTap: press,
            child: Text(
              login ? "注册" : "登录",
              style: TextStyle(
                color: kColorPrimary,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
